﻿using Oxage.Common;
using Oxage.Windows.Controls;

namespace Oxage.CNC.Models
{
	public partial class AxisViewModel : ViewModelBase
	{
		#region Constructor
		public AxisViewModel()
		{
		}
		#endregion

		#region Public properties
		[DataForm(FriendlyName = "Name", GroupName = "Axis")]
		public string Name
		{
			get
			{
				return this.name;
			}
			set
			{
				if (this.name != value)
				{
					this.name = value;
					OnPropertyChanged("Name");
				}
			}
		}
		private string name;

		[DataForm(FriendlyName = "Min limit", GroupName = "Axis")]
		public int MinLimit
		{
			get
			{
				return this.minLimit;
			}
			set
			{
				if (this.minLimit != value)
				{
					this.minLimit = value;
					OnPropertyChanged("MinLimit");
				}
			}
		}
		private int minLimit;

		[DataForm(FriendlyName = "Max limit", GroupName = "Axis")]
		public int MaxLimit
		{
			get
			{
				return this.maxLimit;
			}
			set
			{
				if (this.maxLimit != value)
				{
					this.maxLimit = value;
					OnPropertyChanged("MaxLimit");
				}
			}
		}
		private int maxLimit;

		[DataForm(FriendlyName = "Home position", GroupName = "Axis")]
		public int Home
		{
			get
			{
				return this.home;
			}
			set
			{
				if (this.home != value)
				{
					this.home = value;
					OnPropertyChanged("Home");
				}
			}
		}
		private int home;

		//TODO: Has limit switch
		//TODO: Movement type: linear/angular
		#endregion
	}
}
